﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UsersList.aspx.cs" Inherits="StudentManage.Web.Admin.Management.SysManage.UsersList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register src="/Admin/PageHead/UC_Head.ascx" tagname="UC_Head" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <uc1:UC_Head ID="UC_Head1" runat="server" />
    <script type="text/javascript">
        function SetHidIsEdit(v) {
            $("#HidIsEdit").val(v);
            $("#txt_XH").val("");
            $("#txt_UName").val("");
            $("#txt_UserName").val("");
            $("#txt_PassWord").val("");
            $("#txt_Tel").val("");
            $("#txt_QQ").val("");
            $("#txt_Email").val("");
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:HiddenField ID="HidUserId" runat="server" />
    <asp:HiddenField ID="HidIsEdit" runat="server" Value="0" />
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="17" height="29" valign="top" background="../images/mail_leftbg.gif">
                <img src="../../images/left-top-right.gif" width="17" height="29" />
            </td>
            <td height="29" valign="top" background="../images/content-bg.gif">
                <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg"
                    id="table2">
                    <tr>
                        <td height="31">
                            <div class="titlebt">用户列表</div>
                        </td>
                    </tr>
                </table>
            </td>
            <td width="16" valign="top" background="../images/mail_rightbg.gif">
                <img src="../../images/nav-right-bg.gif" width="16" height="29" />
            </td>
        </tr>
        <tr>
            <td height="71" valign="middle" background="../../images/mail_leftbg.gif">
                &nbsp;
            </td>
            <td valign="top" bgcolor="#F7F8F9">
                <table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="13" valign="top">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="left_txt">
                                        当前位置：用户列表
                                    </td>
                                </tr>
                                <tr>
                                    <td height="1" bgcolor="#CCC">
                                    </td>
                                </tr>
                                <tr>
                                    <td height="30" style="padding:10px 0px;">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0" node-type="header_table">
                                            <tr>
                                                <td align="right" style="width: 60px;">
                                                    学工号：
                                                </td>
                                                <td style="width: 100px;">
                                                    <asp:TextBox ID="txt_SearchHX" runat="server"></asp:TextBox>
                                                </td>
                                                <td align="right" style="width: 80px;">
                                                    姓名：
                                                </td>
                                                <td style="width: 180px;">
                                                    <asp:TextBox ID="txt_SearchName" runat="server"></asp:TextBox>
                                                </td>
                                                <td align="right" style="width:60px;">
                                                    角色：
                                                </td>
                                                <td style="width:180px;">
                                                    <asp:DropDownList ID="Drop_SearchRole" runat="server"  style="width:170px;"></asp:DropDownList>
                                                </td>
                                                <td align="left">
                                                    <asp:Button ID="Btn_Search" runat="server" OnClick="Btn_Search_Click" Text="查询"/>
                                                </td>

                                                <td align="right" style="padding-bottom:10px;">
                                                    <input type="button" value="添加用户" onclick="SetHidIsEdit(0);Showdlg();" style="display:none;" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table width="100%" border="1" cellspacing="0" cellpadding="0" class="table120" style="border-collapse:collapse;">
                                            <thead class="nowtable">
                                                <tr>
                                                    <th style="width:40px;height: 25px; line-height: 25px;">
                                                        序号
                                                    </th>
                                                    <th>
                                                        学工号
                                                    </th>
                                                    <th>
                                                        姓名
                                                    </th>
                                                    <th>
                                                        电话
                                                    </th>
                                                    <th>
                                                        QQ
                                                    </th>
                                                    <th>
                                                        邮箱
                                                    </th>
                                                    <th>
                                                        角色
                                                    </th>
                                                    <th style="width:60px;">修改</th>
                                                    <th style="width:60px;">删除</th>
                                                </tr>
                                            </thead>
                                            <tbody id="UserTbody">
                                                <asp:Repeater runat="server" ID="RepList" OnItemCommand="RepList_ItemCommand">
                                                    <ItemTemplate>
                                                        <tr>
                                                            <td><%=GetXN()%></td>
                                                            <td><%#Eval("XH")%></td>
                                                            <td><%#Eval("UName")%></td>
                                                            <td><%#Eval("Tel")%></td>
                                                            <td><%#Eval("QQ")%></td>
                                                            <td><%#Eval("Email")%></td>
                                                            <td><%#Eval("RoleName")%></td>
                                                            <td><asp:Button ID="Btn_Edit" runat="server" CssClass="RepBtnEdit" CommandName="Edit" CommandArgument=<%#Eval("id")%> /></td>
                                                            <td><asp:Button ID="Btn_RepDel" runat="server" OnClientClick="return confirm('确定删除?');" CssClass="RepBtnDel" CommandName="Del" CommandArgument=<%#Eval("id")%> /></td>
                                                        </tr>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </tbody>
                                        </table>
                                        <webdiyer:aspnetpager id="AspNetPager1" runat="server" pagesize="10" 
                                            firstpagetext="首页" lastpagetext="尾页" nextpagetext="下一页" prevpagetext="上一页" showpageindex="true" onpagechanged="AspNetPager1_PageChanged">
                                         </webdiyer:aspnetpager>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
            <td background="../../images/mail_rightbg.gif">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="middle" background="../images/mail_leftbg.gif">
                <img src="../../images/buttom_left2.gif" width="17" height="17" />
            </td>
            <td height="17" valign="top" background="../../images/buttom_bgs.gif">
                <img src="../../images/buttom_bgs.gif" width="17" height="17" />
            </td>
            <td background="../images/mail_rightbg.gif">
                <img src="../../images/buttom_right2.gif" width="16" height="17" />
            </td>
        </tr>
    </table>


    <div class="die">
    <div id="dialog-form" style="" title="用户维护">
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>学工号：</td>
                <td>
                    <asp:TextBox ID="txt_XH" runat="server" ></asp:TextBox> 
                    <asp:DropDownList ID="Drop_IsStudent" runat="server">
                        <asp:ListItem Value="0" Text="学生"></asp:ListItem>
                        <asp:ListItem Value="1" Text="教师"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>姓名：</td>
                <td><asp:TextBox ID="txt_UName" runat="server" ></asp:TextBox> </td>
                <td>电话：</td>
                <td><asp:TextBox ID="txt_Tel" runat="server" ></asp:TextBox> </td>
            </tr>
            <tr>
                <td>QQ：</td>
                <td><asp:TextBox ID="txt_QQ" runat="server" ></asp:TextBox></td>
                <td>Email：</td>
                <td><asp:TextBox ID="txt_Email" runat="server" ></asp:TextBox></td>
                <td>数据角色：</td>
                <td><asp:DropDownList ID="Drop_DataRole" runat="server"></asp:DropDownList></td>
            </tr>
            <tr>
                <td>登录名：</td>
                <td><asp:TextBox ID="txt_UserName" runat="server" ></asp:TextBox> </td>
                <td>密码：</td>
                <td><asp:TextBox ID="txt_PassWord" runat="server" TextMode="Password" ></asp:TextBox></td>
                <td>操作角色：</td>
                <td><asp:DropDownList ID="Drop_Role" runat="server"></asp:DropDownList></td>
            </tr>
        </table>
        <asp:Button Text="提交" runat="server" CssClass="die" ID="btSave" OnClick="btPost_Click" />
    </div>
</div>
    <div id="dialog_target"></div>
    </form>
</body>
</html>